Mail Lite v.1.0

A Freeware SMTP and POP3 activex (Spanish & English)

(c) 1998 Norberto Fernández

skynor@adinet.com.uy

 

Content:

1 - Important Notes.

2 - Properties.

3 - Methods.

4 - Events.

 

Important Notes:

 

Properties:

Property Name Type Description
CarbonCopyEmail Read-Write Email address of the carbon copy (Cc) recipient used by SendEmail (optional), LoadEmail and by CheckEmail methods. Example: account@provider.com
CarbonCopyName Read-Write Full name of the carbon copy (Cc) recipient used by SendEmail (optional), LoadEmail and by CheckEmail methods. Example: "LastName, FirstName"
ConnTimeOut Read-Write Max. time in seconds to wait some reply from the SMTP or POP3 host by SendEmail or CheckEmail methods (optiona). If the time expires the activex report an error.
EmailBody Read-Write The body of the email that we are sending by SendEmail method, we are looking by LoadEmail method or we are reading by CheckEmail method.
EmailBytes Read-Only Length in bytes including headers of the email that we are reading by LoadEmail method or length of the last arrived email using CheckEmail method.
EmailDate Read-Only Weekdate, date, time an time zone of the email that we are looking by LoadEmail method or reading by CheckEmail method.
EmailFileName Read-Only File name where we save the last arrived email or file of the email that we are reading by LoadEmail method. On the arrival of a new email the file name is authomatically generated by CheckEmail method using an algorithm that compress in six characters the actual date and time in 1/100 seconds in the sequence yyyy-mm-dd-hh-mm-ss-cc. By this method we have an unique name for each email file name and if the files in the in-box directory are sorted by name, authomatically they are sorted by date and time. (great!)
EmailFilter Read-Write The CheckEmail method use the value of this property to filter and read only the emails that have this property value on his header. For example we can only retrieve the emails with a very high priority, the emails sended by some unique sender or any others emails that match any other criteria.
EmailHeader Read-Only The complete header of the email that we are sending by SendEmail method or the complete header of the email that we are reading by the LoadEmail method or reading by CheckEmail method.
EmailPath Read-Write The path to the directory that we are using like an In-Box. This path is used by CheckEmail method to save the arrived emails, and by the LoadEmail method to search inside the passed file name.
EmailSubject Read-Write The subject of the email that we are sending by SendEmail method or we are looking by LoadEmail method or we are reading by CheckEmail method.
EmailUIDL Read-Only The unique email identification inside the header of the email that we are looking by LoadEmail method or we are reading by CheckEmail method.
Error Read-Only The error object and his properties. We can get the information of the last error if any.
HostDelete Read-Write Used by CheckEmail method. If the value of this property is True the email checked is deleted from the host, and if the value is False, a copy of the email is keeped on the host.
HostNamePop3 Read-Write Used by the CheckEmail method and is the name of the email host of our Internet service provider where our emails are retrieved (POP3). For example: pop3.ourprovider.com. May be is equal to HostNameSmtp.
HostNameSmtp Read-Write Use by the SendEmail method and is the name of the email host of our Internet service provider where our emails are delivery (SMTP). For example: smtp.ourprovider.com. May be is equal to HostNamePop3.
HostPortPop3 Read-Write Used by the CheckEmail method and is the TCP port for POP3 protocol of the email host of our Internet service provider. Normally: 110
HostPortSmtp Read-Write Use by the SendEmail method and is the TCP port for SMTP protocol of the email host of our Internet service provider. Normally: 25
RecipientEmail Read-Write Email address of the recipient used by SendEmail method, by the LoadEmail method or by CheckEmail method. Example: somefriend@someprovider.com
RecipientName Read-Write Full name of the recipient used by SendEmail method (optional), by the LoadEmail method or by CheckEmail method. Example: "LastName, FirstName"
SenderEmail Read-Write Email address of the sender used by SendEmail method, by the LoadEmail method or by CheckEmail method. Example: myaccount@myprovider.com
SenderName Read-Write Full name of the sender used by SendEmail method (optional, by the LoadEmail method or by CheckEmail method. Example: "MyLastName, MyFirstName"
Spanish Read-write The value of this property set the Language of the description field of the Status event. By this way you can develop english, spanish or multilingual applications.
TotalBytes Read-Only Used by CheckEmail method and is the byte count waiting for retrieving on our internet service provider mail host.
TotalChecked Read-Only Used by CheckEmail method and is the count of the last Ok retrieved emails.
TotalEmails Read-Only Used by CheckEmail method and is the email count waiting for retrieving on our internet service provider mail host.
UserAccount Read-Write Used by CheckEmail method to gain access to our account. Normally it is the first part of our email address. myaccount@myprovider.com
UserHeaders Read-Write Used by SendEmail method, with this property we can add some headers to the email header. For example we can put a header like this: "X-SenderApp: MyAppName" and then we can filter all the email that have this header with the EmailFilter property.
UserPassword Read-Write Used by CheckEmail method to access to our account. It is secret and for security never we must drop it on any place or give it to any people.

 

Methods:

Method Name Parameters Return Description
SendEmail (none) Boolean Once we fill all the properties that needed by this method, we can call it to send the email to the mail server. If the action is successfully it return True and if it is unsuccessfully it return False.
CheckEmail Retrieve (boolean), Lines (integer) Boolean Once we fill all the properties that needed by this method, we can call it to retrieve the email to the mail server. If the action is successfully it return True and if it is unsuccessfully it return False.

Some examples:

If the first parameter (Retrieve) is True, all the email that match the EmailFilter property are retrieved, and if his value is false, no emails are retrieved and only is checked how many emails and how much bytes are waiting on the email server, in this last case the second parameter do not care.

If the second parameter (Lines) is True (-1) then completes emails are retrieved and if his value is between 0 and 32767, only that number of lines of the body of each email are retrieved.

If the first parameter is True, the second parameter is also True, and the EmailFilter property is empty, all the emails are retrieved.

If the first parameter is True and the second parameter is 0, only the headers of the emails that match the EmailFilter property are retrieved.

If the first parameter is True, the second parameter is 2, 3 or 4, the HostDelete property is False and the EmailFilter property has a value equal to "X-Priority: 1", then we can make an application that check our email, leave it on the host to retrieve later and make and send a new email with only that little number of lines to any important paging service company to notify to our alphanumeric pager the arrival of all the email that is very important and we are waiting.

LoadEmail File Name (string) Boolean We can call this method given it a file name to read an email from our local in-box directory and parse all the properties to fill later a screen form to look it, or to make a new email to notify something. If the file is open and read successfully it return True, and if it has any error it return False.

 

Events:

Event Parameters Description
Status Code (integer), Description (string) Each event and error during the transmit and receive instances of the SendEmail and CheckEmail methods are notified. The codes 100... are for CheckEmail method, the codes 200... are for SendEmail method and the codes 400... are all errors. The description string is a short explanation of the event or error that fire the process. If the value of the Spanish property is set to True, all the messages are notified with the description parameter in Spanish Language. (grande!)

 

(c) 1998 Norberto Fernández